<div class="auth-main">
  <div class="auth-block">
    <h1>漏洞信息采集系统</h1>
    <!--<a routerLink="/register" class="auth-link">New to ng2-admin? Sign up!</a>-->

    <form [formGroup]="form" (ngSubmit)="onSubmit(form.value)" class="form-horizontal">
      <div class="form-group row" *ngIf="failure">
        <label class="col-sm-2 control-label" style="color:orangered">提示</label>
        <label class="col-sm-10 control-label" style="color:orangered">{{message}}</label>
      </div>
      <div class="form-group row" [ngClass]="{'has-error': (!username.valid && username.touched), 'has-success': (username.valid && username.touched)}">
        <label for="inputEmail3" class="col-sm-2 control-label">用户名:</label>

        <div class="col-sm-10">
          <!--<input [formControl]="username" type="text" class="form-control" id="inputEmail3" placeholder="ÇëÊäÈëÓÃ»§Ãû">-->
          <div class="input-group">
            <span class="input-group-addon input-group-addon-primary addon-left" ><i class="fa fa-user fa-fw"></i></span>
            <input type="text" class="form-control with-primary-addon" placeholder="用户名" aria-describedby="basic-addon1" id="inputEmail3" [formControl]="username">
          </div>
        </div>
      </div>
      <div class="form-group row" [ngClass]="{'has-error': (!password.valid && password.touched), 'has-success': (password.valid && password.touched)}">
        <label for="inputPassword3" class="col-sm-2 control-label">密码:</label>

        <div class="col-sm-10">
          <!--<input [formControl]="password" type="password" class="form-control" id="inputPassword3" placeholder="Password">-->
          <div class="input-group">
            <span class="input-group-addon input-group-addon-primary addon-left" ><i class="fa fa-key fa-fw"></i></span>
            <input type="password" class="form-control with-primary-addon" placeholder="密码" aria-describedby="basic-addon1" id="inputPassword3" [formControl]="password">
          </div>
        </div>
      </div>

      <div class="form-group row" *ngIf="iflogin">
        <div class="text-center">
          <i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i>
          <span class="sr-only">载入中...</span>
        </div>
      </div>

      <div class="form-group row">
        <div class="offset-sm-2 col-sm-10">
          <button [disabled]="!form.valid" type="submit" class="btn btn-default btn-auth">登录</button>
          <!--<a routerLink="/login" class="forgot-pass">Forgot password?</a>-->
        </div>
      </div>
    </form>

    <!--    <div class="auth-sep"><span><span>or Sign in with one click</span></span></div>-->

    <!--    <div class="al-share-auth">
          <ul class="al-share clearfix">
            <li><i class="socicon socicon-facebook" title="Share on Facebook"></i></li>
            <li><i class="socicon socicon-twitter" title="Share on Twitter"></i></li>
            <li><i class="socicon socicon-google" title="Share on Google Plus"></i></li>
          </ul>
        </div>-->
  </div>
</div>
